//
//  ViewController.m
//  06-homeWork-QQ
//
//  Created by 402030900@qq.com on 16/7/21.
//  Copyright © 2016年 402030900@qq.com. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];

    self.navigationController.navigationBar.barTintColor = [UIColor colorWithRed:0.224 green:0.659 blue:0.953 alpha:1.000];

    UISegmentedControl * seg = [[UISegmentedControl alloc]initWithItems:@[@"消息",@"电话"]];
    [seg setFrame:CGRectMake(0, 0, 180, 40)];
    seg.tintColor = [UIColor whiteColor];
    self.navigationItem.titleView = seg;
    UIImageView * imageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 40, 40)];
    imageView.image = [UIImage imageNamed:@"face"];
    imageView.layer.cornerRadius = 20;
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithCustomView:imageView];
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:(UIBarButtonSystemItemAdd) target:self action:nil];
    self.navigationItem.rightBarButtonItem.tintColor = [UIColor whiteColor];
    
    
    
    // Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
